package com.meituan.stock.biz.model.converter;

import com.meituan.stock.biz.model.bo.StockBO;
import com.meituan.stock.dao.model.StockDO;

/**
 * 从其他数据模型向库存DO的转换器
 * @author ShenWenhao
 * @Created by ShenWenhao
 * @Date 2022/5/9 16:15
 */
public class StockDOConverter {

    public static StockDO fromBO(StockBO stockBO){
        StockDO stockDO = new StockDO();
        stockDO.setId(stockBO.getId());
        stockDO.setGoodId(stockBO.getGoodId());
        stockDO.setWarehouseId(stockBO.getWarehouseId());
        stockDO.setMoney(stockBO.getMoney());
        stockDO.setAccount(stockBO.getAccount());
        return stockDO;
    }

}
